Popular Searches
Popular Course Categories
Popular Courses

Selection vs Projection in DBMS Explained Simply

What Our Students Say
selection vs projection in dbms table example explanation

Understand the key differences between selection and projection operations in DBMS with easy examples and practical use cases.

What is Selection in DBMS?

Selection is an operation in DBMS that is used to filter rows (records) from a table based on a specific condition.

It is represented by the symbol σ (sigma) in relational algebra.

Example:

Suppose you have a table named Students:

IDNameCity
1RaviMumbai
2AnitaPune
3RahulMumbai

If you want only students from Mumbai, selection is used.

SQL Query:

SELECT * FROM Students WHERE City = 'Mumbai';

Output:

IDNameCity
1RaviMumbai
3RahulMumbai

 Selection works on rows, not columns.

What is Projection in DBMS?

Projection is an operation used to select specific columns from a table, ignoring the rest.

It is represented by the symbol π (pi) in relational algebra.

Example:

Using the same Students table:

If you only want student names:

SQL Query:

SELECT Name FROM Students;

Output:

Name
Ravi
Anita
Rahul

 Projection works on columns, not rows.

Key Differences Between Selection and Projection

FeatureSelectionProjection
Operation OnRows (records)Columns (attributes)
PurposeFilter dataChoose specific fields
Symbolσ (Sigma)π (Pi)
SQL EquivalentWHERE clauseSELECT column names
Data ReductionReduces number of rowsReduces number of columns

Both operations are fundamental in relational algebra and are widely used in SQL queries.

Learn DBMS and SQL with Practical Training

If you want to deeply understand DBMS concepts like selection, projection, joins, normalization, and SQL queries, practical training is essential.

You can explore:

This training focuses on real-world database usage, query writing, and hands-on projects to make you job-ready.

Final Thoughts

Selection and projection are basic yet powerful operations in DBMS. While selection filters rows based on conditions, projection helps you choose only the required columns.

Understanding both is essential for writing efficient SQL queries and managing databases effectively.

What is Selection in DBMS?

What is Projection in DBMS?

Key Differences Between Selection and Projection

Learn DBMS and SQL with Practical Training

Connect With Us
whatsapp